<?php
#из-за недостатка алгоритма, количество $total должно быть кратно $threads
$total       = 100; # количество от 1
$threads     = 50; # количество от 1 

$year_start  = 1980;
$year_stop   = 1982;
$year        = $year_start;

$day_start   = 1;
$day_stop    = 3;
$day         = $day_start;

$st          = 0;
$st_max      = 110;
$is_end   = 0;

while($is_end == 0) {
	for($l = 0; $l+$threads <= $total; $l += $threads) {
		unset($url);
		for($t = 0; $t < $threads; $t++) {
			if($st >= $st_max) {
				$st = 0;
				if($day < $day_stop) {
					$day++;
				} else {
					if($year < $year_stop) {
						$day    = $day_start;
						$year++;
					} else {
						$is_end = 1;
						break; # выход из $
					}
				}
			}
			$url[$t]  = "day=".$day;
			$url[$t] .= "\tyear=".$year;
			$url[$t] .= "\tst=".$st;
			$st += 10;
		}
		if(isset($url)) {
			echo "---\n";
			for($t = 0; $t < count($url); $t++) {
				echo "login=".($l+$t)." \tl=".$l."\tt=".$t."\t".$url[$t]."\n";
			}
		}
	}
}
echo "DONE!\n";
?>